<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org "  xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('新增出库单')" />
    <th:block th:include="include :: jquery-smartwizard-css" />
    <th:block th:include="include :: datetimepicker-css" />
    <style type="text/css">
        /* 如果要让工具栏固定在页面底部,使用下面的样式,不需要的可以注释 */
        .sw>.toolbar-bottom{
            z-index: 100;
            bottom: 0px;
            left: 0;
            width: 100%;
            position: fixed;
            text-align: right;
            background: #fff;
            box-shadow: 0 -2px 6px 1px hsla(223,8%,83%,.5);
            border-top: 1px solid #e3e4e8;
        }
        /* 如果设置了是否自动调节高度为false,需要加滚动条 */
        .sw>.tab-content{
            overflow-x: hidden;
            overflow-y: auto;
        }
    </style>
</head>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight" style="height: 100%;">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox">
                <div class="ibox-title">
                    <h5>
                        鑫视鑫瑞
<!--                        <small>https://github.com/techlab/jquery-smartwizard</small>-->
                    </h5>
                </div>
                <div class="ibox-content">
                    <div class="row select-list" style="padding-left: 15px; margin-bottom: 10px;">
                        <ul>
                            <li hidden>
                                选择样式：
                                <select id="theme-selector">
<!--                                    <option value="default">Default</option>-->
                                    <option value="arrows" selected>Arrows</option>
<!--                                    <option value="dots">Dots</option>-->
<!--                                    <option value="progress">Progress</option>-->
                                </select>
                            </li>
                            <!-- 快速操作栏按钮 -->
                            <li>
                                <div class="btn-group-sm" role="group">
                                    <a class="btn btn-info" id="prev-btn"> 上一步 </a>
                                    <a class="btn btn-success" id="next-btn"> 下一步 </a>
                                    <a class="btn btn-danger" id="reset-btn"> 重置 </a>
                                </div>
                            </li>
                        </ul>

                    </div>
                    <div id="smartwizard">
                        <ul class="nav">
                            <li class="nav-item">
                                <a class="nav-link" href="#step-1"> 第一步 </a>
                            </li>
                            <li class="nav-item">
                                <a class="nav-link" href="#step-2"> 第二步 </a>
                            </li>
                            <li class="nav-item">
                                <a class="nav-link" href="#step-3"> 第三步 </a>
                            </li>
                            <li class="nav-item">
                                <a class="nav-link" href="#step-4"> 第四步 </a>
                            </li>
                        </ul>
                        <div class="tab-content">
<!--                            <form class="form form-horizontal m-t"  id="createRent" novalidate>-->
<!--                            </form>-->
                            <div id="step-1" class="tab-pane" role="tabpanel" aria-labelledby="step-1">
                                <div>
                                    <form class="form form-horizontal m-t">
                                        <div class="form-group">
                                            <label class="col-sm-3 control-label is-required">选择客户：</label>
                                            <div class="col-sm-8">
                                                <div class="input-group">
                                                    <input id="searchCustomer" placeholder="请输入客户名称或手机号或身份证号"   autocomplete="off" class="form-control searchCustomer" type="text" required maxlength="30">
                                                    <div class="input-group-btn">
                                                        <button type="button" class="btn btn-white dropdown-toggle" data-toggle="dropdown">
                                                            <span class="caret"></span>
                                                        </button>
                                                        <ul class="dropdown-menu dropdown-menu-right" role="menu">
                                                        </ul>
                                                    </div>
                                                </div>
                                                <span class="help-block m-b-none">
                                                            <i class="fa fa-info-circle"></i>
                                                            若是未录入过该客户，请先添加该客户！
                                                    </span>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-3 control-label"></label>
                                            <div class="col-sm-8">
                                                <button class="btn btn-success"  type="button" onclick="createCustomer()" >新增客户</button>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-3 control-label"></label>
                                            <div class="col-sm-8">
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-3 control-label"></label>
                                            <div class="col-sm-8">
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-3 control-label"></label>
                                            <div class="col-sm-8">
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-3 control-label"></label>
                                            <div class="col-sm-8">
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-3 control-label"></label>
                                            <div class="col-sm-8">
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-3 control-label"></label>
                                            <div class="col-sm-8">
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-3 control-label"></label>
                                            <div class="col-sm-8">
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-3 control-label"></label>
                                            <div class="col-sm-8">
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-3 control-label"></label>
                                            <div class="col-sm-8">
                                            </div>
                                        </div>
                                    </form>
                                </div>
                            </div>
                            <div id="step-2" class="tab-pane" role="tabpanel" aria-labelledby="step-2">
                                <div>
                                    <form class="form form-horizontal m-t">
                                        <h4 class="form-header h4">客户信息</h4>
                                        <div class="form-group">
                                            <label class="col-sm-3 control-label ">客户公司名称：</label>
                                            <div class="col-sm-8">
                                                <input id="customerName" name="customerName" class="form-control" readonly type="text">
                                                <input type="text" id="customerId" name="customerId" hidden/>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-3 control-label ">联系人：</label>
                                            <div class="col-sm-8">
                                                <input id="customerContacts" name="customerContacts" class="form-control" readonly type="text">
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-3 control-label">客户身份证号：</label>
                                            <div class="col-sm-8">
                                                <input id="customerIdCard" name="customerIdCard" class="form-control" readonly type="text">
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-3 control-label">客户手机号：</label>
                                            <div class="col-sm-8">
                                                <input id="customerPhone" name="customerPhone" class="form-control" readonly type="text">
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-3 control-label">客户座机号：</label>
                                            <div class="col-sm-8">
                                                <input id="customerTel" name="customerTel" class="form-control" readonly type="text">
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-3 control-label">客户地址：</label>
                                            <div class="col-sm-8">
                                                <textarea id="customerAddress" name="customerAddress" class="form-control" readonly  ></textarea>
                                            </div>
                                        </div>
                                    </form>
                                </div>
                            </div>
                            <div id="step-3" class="tab-pane" role="tabpanel" aria-labelledby="step-3">
                                <div>
                                    <form class="form form-horizontal m-t">
                                        <h4 class="form-header h4">出库单信息</h4>
                                        <div class="form-group">
                                            <label class="col-sm-3 control-label is-required">出单时间：</label>
                                            <div class="col-sm-8">
                                                <div class="input-group date">
                                                    <input name="issueTime" class="form-control" placeholder="yyyy-MM-dd" autocomplete="off" type="text" required>
                                                    <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-3 control-label is-required">计划租赁开始日期：</label>
                                            <div class="col-sm-8">
                                                <div class="input-group date">
                                                    <input name="planRentStartTime"  id="planRentStartTime" class="form-control" autocomplete="off" placeholder="yyyy-MM-dd" type="text" required>
                                                    <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-3 control-label is-required">实际租赁开始日期：</label>
                                            <div class="col-sm-8">
                                                <div class="input-group date">
                                                    <input name="actualRentStartTime" id="actualRentStartTime"  class="form-control" autocomplete="off" placeholder="yyyy-MM-dd" type="text" required>
                                                    <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-3 control-label is-required">计划租赁结束日期：</label>
                                            <div class="col-sm-8">
                                                <div class="input-group date">
                                                    <input name="planRentEndTime" id="planRentEndTime"  class="form-control" autocomplete="off" placeholder="yyyy-MM-dd" type="text" required>
                                                    <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-3 control-label">备  注：</label>
                                            <div class="col-sm-8">
                                                <textarea name="note" maxlength="500" class="form-control" autocomplete="off" cols="8" rows="3"></textarea>
                                            </div>
                                        </div>
                                    </form>
                                </div>
                            </div>
                            <div id="step-4" class="tab-pane" role="tabpanel" aria-labelledby="step-4">
                                <div>
                                    <form class="form form-horizontal m-t">
                                        <div class="form-group">
                                            <label class="col-sm-3 control-label">器材编号：</label>
                                            <div class="col-sm-6">
                                                <div class="input-group">
                                                    <input id="searchDevice" placeholder="请输入器材编号" required autocomplete="off" class="form-control" type="text" maxlength="30" allowClear="true">
                                                </div>
                                            </div>
                                            <div class="col-sm-2">
                                                <a class="btn btn-success" onclick="addColumn()">
                                                    <i class="fa fa-plus"></i> 添加器材
                                                </a>
                                            </div>
                                        </div>
                                        <h4 class="form-header h4">器材数据</h4>
                                        <div class="form-group">
                                            <div class="col-sm-12">
                                                <button type="button" class="btn btn-white btn-sm" onclick="deleteColumn()"><i class="fa fa-minus"> 删除</i></button>
                                                <div class="col-sm-12 select-table table-striped">
                                                    <table id="bootstrap-table"></table>
                                                </div>
                                            </div>
                                        </div>
                                    </form>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: jquery-smartwizard-js" />
<th:block th:include="include :: datetimepicker-js" />
<th:block th:include="include :: bootstrap-suggest-js" />
<th:block th:include="include :: bootstrap-typeahead-js" />
<script>
    $(document).ready(function() {
        // 工具栏按钮
        var btnFinish = $('<a id="btn-finish"></a>').text('完成')
            .addClass('btn btn-info')
            .on('click', function(){ submit(); });
        var btnCancel = $('<a id="btn-cancel"></a>').text('取消')
            .addClass('btn btn-danger')
            .on('click', function(){ $('#smartwizard').smartWizard("reset"); });
        // 下面两个按钮是为了因为插件默认的是botton,这里换成<a>,也可以选择用样式替换,或者不替换
        var btnNext = $('<a id="btn-next"></a>').text('下一步')
            .addClass('btn btn-info')
            .on('click', function(){ $('#smartwizard').smartWizard("next");});
        var btnPrev = $('<a id="btn-prev"></a>').text('上一步')
            .addClass('btn btn-success disabled')
            .on('click', function(){ $('#smartwizard').smartWizard("prev"); });
        // 初始化表单向导组件
        $('#smartwizard').smartWizard({
            theme: 'arrows', // default, arrows, dots, progress
            autoAdjustHeight : false, // 自动调整高度, 默认true
            enableURLhash:false, //开启URL hash,开启后点击浏览器前进后退按钮会执行下一步和上一步操作
            transition: {
                animation: 'slide-horizontal', // Effect on navigation, none/fade/slide-horizontal/slide-vertical/slide-swing
            },
            toolbarSettings: {
                showNextButton: false,// 因为上面自定义了下一步按钮, 所以隐藏掉插件自带的按钮, 如果不使用自定义按钮, 需要改为true或者去掉该属性
                showPreviousButton: false,// 因为上面自定义了上一步按钮, 所以隐藏掉插件自带的按钮, 如果不使用自定义按钮, 需要改为true或者去掉该属性
                toolbarExtraButtons: [btnCancel,btnPrev,btnNext,btnFinish]// 扩展的按钮集合
            }
        });
    });

    function submit(){
        // var data = $("#createRent").serializeArray();
        // $.operate.saveModal("/system/rent/add", data);
        var data = [];
        $('.form').each(function (index, form){
            // 这里可以使用$.common.formToJSON(formId);  需要在form上加id
            $.each($(form).serializeArray(), function(i, field) {
                if(data[field.name]) {
                    data[field.name] += ("," + field.value);
                } else {
                    data[field.name] = field.value;
                }
                data.push({"name":field.name,"value":field.value});
            });
        });
        // $.modal.alert(JSON.stringify(data));
        $.operate.saveModal("/system/rent/add", data,function(result){
            if (result.code == web_status.SUCCESS) {
                $.modal.alertSuccess(result.msg)
                $.modal.closeTab();
            } else if (result.code == web_status.WARNING) {
                $.modal.alertWarning(result.msg)
            } else {
                $.modal.alertError(result.msg);
            }
            $.modal.closeLoading();
        });
    }
    // 显示步骤时将触发事件
    $("#smartwizard").on("showStep", function(e, anchorObject, stepNumber, stepDirection, stepPosition) {
        // 下面按钮是快速操作栏的
        $("#prev-btn").removeClass('disabled');
        $("#next-btn").removeClass('disabled');
        // 下面按钮是工具栏的
        $("#btn-prev").removeClass('disabled');
        $("#btn-next").removeClass('disabled');
        $("#btn-finish").removeClass('disabled');
        if(stepPosition === 'first') {
            $("#prev-btn").addClass('disabled');// 快速操作栏（演示用）
            $("#btn-prev").addClass('disabled');
            $("#btn-finish").addClass('disabled');
        } else if(stepPosition === 'last') {
            $("#next-btn").addClass('disabled');// 快速操作栏（演示用）
            $("#btn-next").addClass('disabled');
        } else {
            $("#prev-btn").removeClass('disabled');// 快速操作栏（演示用）
            $("#next-btn").removeClass('disabled');// 快速操作栏（演示用）
            $("#btn-prev").removeClass('disabled');
            $("#btn-next").removeClass('disabled');
            $("#btn-finish").addClass('disabled');
        }
    });

    // 该事件在离开某个步骤之前触发
    $("#smartwizard").on("leaveStep", function(e, anchorObject, currentStepNumber, nextStepNumber, stepDirection) {
        if(stepDirection == 'forward'){
            var form = $("#step-" + (currentStepNumber + 1)).find('.form');
            if(form.length > 0){
                return form.validate().form();
            }
            return true;
        }
        return true;
    });

    $("#theme-selector").on("change", function() {
        // Change theme
        var options = {
            theme : $(this).val()
        };
        $('#smartwizard').smartWizard("setOptions", options);
        return true;
    });

    $("#reset-btn").on("click", function() {
        // Reset wizard
        $('#smartwizard').smartWizard("reset");
        return true;
    });

    $("#prev-btn").on("click", function() {
        // Navigate previous
        $('#smartwizard').smartWizard("prev");
        return true;
    });

    $("#next-btn").on("click", function() {
        // Navigate next
        $('#smartwizard').smartWizard("next");
        return true;
    });
    // 客户自动补全 start
    var customerResult;
    var testBsSuggest = $("#searchCustomer").bsSuggest({
        allowNoKeyword: false, //是否允许无关键字时请求数据
        multiWord: false, //以分隔符号分割的多关键字支持
        url: "http://"+window.location.host + "/system/customer/queryValidCustomerByParam?param=",
        getDataMethod: "url", //获取数据的方式，总是从 URL 获取
        effectiveFields: ["name", "contacts","idCard", "phone", "tel", "address"],
        searchFields: [ "name", "contacts","idCard", "phone", "tel", "address"],
        effectiveFieldsAlias:{name: "姓名",contacts:"联系人", idCard:"身份证号",phone:"手机号",tel:"座机号",address:"地址"},
        clearable: true,
        idField: "id",
        keyField: "name"
    }).on('onDataRequestSuccess', function (e, result) {
        customerResult = result.value;
    }).on('onSetSelectValue', function (e, keyword) {
        $("#customerId").val(keyword.id);
        $("#customerName").val(keyword.key);
        $("#customerTel").val(customerResult[keyword.index].tel);
        $("#customerPhone").val(customerResult[keyword.index].phone);
        $("#customerAddress").val(customerResult[keyword.index].address);
        $("#customerIdCard").val(customerResult[keyword.index].idCard);
        $("#customerContacts").val(customerResult[keyword.index].contacts);
    }).on('onUnsetSelectValue', function (e) {
        $("#customerId").val(0);
        $("#customerName").val("");
        $("#customerTel").val("");
        $("#customerPhone").val("");
        $("#customerAddress").val("");
        $("#customerIdCard").val("");
        $("#customerContacts").val("");
    });
    // 客户自动补全 end
    //时间 start
    $("input[name='issueTime']").datetimepicker({
        format: "yyyy-mm-dd",
        minView: "month",
        autoclose: true
    });

    $("input[name='planRentStartTime']").datetimepicker({
        format: "yyyy-mm-dd",
        minView: "month",
        autoclose: true
    });

    $("input[name='actualRentStartTime']").datetimepicker({
        format: "yyyy-mm-dd",
        minView: "month",
        autoclose: true
    });

    $("input[name='planRentEndTime']").datetimepicker({
        format: "yyyy-mm-dd",
        minView: "month",
        autoclose: true
    });

    $('.form_date').datetimepicker({
        format: "yyyy-mm-dd",
        minView: "month",
        autoclose: true
    });
    //时间 end
    // 嵌入子页面 start
    function createCustomer() {
        var url = ctx + "system/customer/add";
        // $.modal.openTab('客户管理', url);
        $.modal.open("新增客户", url, $(window).width()*0.6, $(window).height()*0.8, function(index, layero) {
            // 获取弹窗参数（方式一）
            // var body = layer.getChildFrame('body', index);
            // $("#searchCustomer").val(body.find('#phone').val());
            // 获取弹窗参数（方式二）
            // console.log($(layero).find("iframe")[0].contentWindow.document.getElementById("id").value);
            var iframeWin = layero.find('iframe')[0];
            iframeWin.contentWindow.submitHandler(index, layero);
        });
    }

    // 出租器材列表
    function addColumn() {
        var deviceSerialNumber = $("#searchDevice").val();
        if($.common.isEmpty(deviceSerialNumber)){
            $.modal.alert("请输入器材编号");
        }else{
            //是否已经存在该设备
            var isExit = 0;
            $("input[name$='deviceSerialNumber']").each(function(){
                if($(this).val() == deviceSerialNumber){
                    isExit = 1;
                    return false;
                }
            });
            if(isExit == 1){
                $.modal.alert("已经添加该设备！");
            }else{
                //是否可以出租
                $.post(ctx + "system/device/selectEntityDeviceBySerialNumber", {serialNumber: deviceSerialNumber}, function(result) {
                    if (result.code == web_status.SUCCESS) {
                        var device = result.value;
                        if($.common.isEmpty(device)){
                            $.modal.alert("根据器材编号，查无此设备！");
                        }else{
                            var deviceValid = device.valid;
                            if(1 != deviceValid){
                                if(0 == deviceValid){
                                    $.modal.alert("添加设备还未采购入库，请重新输入编号！");
                                }else if(2 == deviceValid){
                                    $.modal.alert("添加设备还在出租中，请重新输入编号！");
                                }else if(3 != deviceValid){
                                    $.modal.alert("添加设备已经损害，请重新输入编号！");
                                }else{
                                    $.modal.alert("添加设备无法出租，请重新输入编号！");
                                }
                            }else{
                                var row = {
                                    deviceId:device.id,
                                    typeName: device.typeName,
                                    modeName: device.modeName,
                                    serialNumber: device.serialNumber,
                                    devicePlanStartRentTime: $("#planRentStartTime").val(),
                                    devicePlanEndRentTime: $("#planRentEndTime").val(),
                                    deviceActualStartRentTime: $("#actualRentStartTime").val(),
                                    note: device.note,
                                }
                                sub.addColumn(row);
                                $("#searchDevice").val("");//清空
                            }
                        }
                    } else {
                        $.modal.msgError(result.msg);
                    }
                });
            }

        }
    }

    function deleteColumn(){
        sub.delColumn();
    }
    $(function() {
        var options = {
            pagination: false,
            showSearch: false,
            showRefresh: false,
            showToggle: false,
            showColumns: false,
            sidePagination: "client",
            columns: [{
                checkbox: true
            },
                {
                    field: 'deviceId',
                    align: 'center',
                    title: "序号",
                    formatter: function (value, row, index) {
                        var columnIndex = $.common.sprintf("<input class='form-control'  type='hidden' name='rentDeviceList[%s].deviceId' value='%s'>", index,value);
                        return columnIndex + $.table.serialNumber(index);
                    }
                },
                {
                    field: 'typeName',
                    align: 'center',
                    title: '器材类型名称',
                    formatter: function(value, row, index) {
                        var html = $.common.sprintf("<input class='form-control'  type='hidden' name='rentDeviceList[%s].deviceName' value='%s'>", index, value);
                        return html + $.common.sprintf(value);
                    }
                },
                {
                    field: 'modeName',
                    align: 'center',
                    title: '器材型号',
                    formatter: function(value, row, index) {
                        var html = $.common.sprintf("<input class='form-control' type='hidden'  name='rentDeviceList[%s].deviceModel' value='%s'>", index, value);
                        return html + $.common.sprintf(value);
                    }
                },
                {
                    field: 'serialNumber',
                    align: 'center',
                    title: '器材编号',
                    formatter: function(value, row, index) {
                        // var html = $.common.sprintf("<input class='form-control' type='text'  name='rentDeviceList[%s].deviceSerialNumber' value='%s'>", index, value);
                        var html = $.common.sprintf("<input class='form-control' type='hidden'  name='rentDeviceList[%s].deviceSerialNumber' value='%s'>", index, value);
                        return html + $.common.sprintf(value);
                    }
                },
                {
                    field: 'devicePlanStartRentTime',
                    align: 'center',
                    title: '计划租赁开始日期',
                    formatter: function(value, row, index) {
                        var html = $.common.sprintf("<input class='form-control' type='text' name='rentDeviceList[%s].planRentStartTime' value='%s' placeholder='yyyy-MM-dd'>", index, value);
                        return html;
                    }
                },
                {
                    field: 'devicePlanEndRentTime',
                    align: 'center',
                    title: '计划租赁开始日期',
                    formatter: function(value, row, index) {
                        var html = $.common.sprintf("<input class='form-control' type='text' name='rentDeviceList[%s].planRentEndTime' value='%s' placeholder='yyyy-MM-dd'>", index, value);
                        return html;
                    }
                },
                {
                    field: 'deviceActualStartRentTime',
                    align: 'center',
                    title: '实际租赁开始日期',
                    formatter: function(value, row, index) {
                        var html = $.common.sprintf("<input class='form-control' type='text' name='rentDeviceList[%s].actualRentStartTime' value='%s' placeholder='yyyy-MM-dd'>", index, value);
                        return html;
                    }
                },
                {
                    field: 'note',
                    align: 'center',
                    title: '器材备注',
                    formatter: function(value, row, index) {
                        var html = $.common.sprintf("<input class='form-control' type='text' name='rentDeviceList[%s].note' value='%s'>", index, value);
                        return html;
                    }
                }]
        };
        $.table.init(options);
    });
    $("#bootstrap-table").on("post-body.bs.table", function (e, args) {
        $("input[name$='planRentStartTime']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true,
            pickerPosition:'top-right'
        });
        $("input[name$='planRentEndTime']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true,
            pickerPosition:'top-right'
        });
        $("input[name$='actualRentStartTime']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true,
            pickerPosition:'top-right'
        });
    });
</script>
</body>
</html>
